Header Ads

How do you convert minutes to seconds in Python?

 Question Source

1 minute = 60 seconds
So Minutes can be converted into seconds by multiplying it with 60
Here is the code for same

Code : 

def convert(min):
    sec = min*60
    return sec

minutes = int(input("Minutes : "))
print("Second : ",convert(minutes))

Output :

Minutes : 5
Second : 300

Explanation :

Here I have inputted 5 which is converted to seconds and 300 as a result printed. You can also take input as floating point number which will help you to input minutes in decimal.

Post a Comment

4 Comments

  1. Bro I want To Contact you How i can
    I filled the Form and how i contact You You Can reply me here Also

    ReplyDelete
  2. Bro I want To Contact you How i can
    I filled the Form and how i contact You You Can reply me here Also

    I ALSO HAVE MY SITE

    http://theyourcode.blogspot.com/

    ReplyDelete
    Replies
    1. i have mailed you, my name is abhay kumar or contact me at instagram @abhie.7

      Delete

Ask Your Queries in the comments